<?php

require("sqlconnect.php");

$imgID = $_GET['imgID'];
$username = $_GET['username'];
$comments = $_POST['comments'];

$sql = "INSERT INTO comments(imgID, username, comments) VALUES ('$imgID', '$username', '$comments')";
$result = mysql_query($sql);
header('Location: showPic.php?imgID=' . $imgID);
?>